package com.gite.nouette.admin.implementation.controller;

import com.gite.nouette.admin.contract.controller.ICCommand;
import com.gite.nouette.admin.contract.controller.ICHandlerModule;
import com.gite.nouette.admin.contract.model.ICommand;
import com.gite.nouette.admin.contract.model.IHandlerModule;
import com.gite.nouette.admin.contract.view.IVHandlerModule;

public class CHandlerModuleImpl extends
		AbstractController<IVHandlerModule, IHandlerModule> implements
		ICHandlerModule {

	@Override
	public boolean addCommand(ICommand command) {
		return addCCommand((ICCommand<?, ?>) command);
	}

	@Override
	public boolean removeCommand(ICommand command) {
		return removeCCommmand((ICCommand<?, ?>) command);
	}

	@Override
	public boolean addCCommand(ICCommand<?, ?> cCommand) {
		getM().addCommand(cCommand);
		getV().addCommand(cCommand.getV());
		return false;
	}

	@Override
	public boolean removeCCommmand(ICCommand<?, ?> cCommand) {
		getM().removeCommand(cCommand);
		// getView().removeCommand(cCommand.getView());
		return false;
	}
}
